package work.work_01.oop;

/**
 * @author: lys
 * @类名: Vegicle
 * @Title:
 * @date: 2020/7/15
 **/
public class Vegicle {
    //定义属性
    private static String brand;
    private String color;
    private double speed;

    //构造方法
    public Vegicle(){}
    public Vegicle(String brand,String color){
        this.brand = brand;
        this.color = color;
    }
    public Vegicle(String brand,String color,double speed){
        this.brand = brand;
        this.color = color;
        this.speed = speed;
    }

    //run方法
    public void run(){
        System.out.println("vegicle---running.");
    }

    //getter和setter方法
    public static String getBrand() {
        return brand;
    }

    public static void setBrand(String brand) {
        Vegicle.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }



}
